//
//  LayerChiOption.cpp
//  lhq
//
//  Created by codin on 14-7-24.
//
//

#include "LayerChiOption.h"

USING_NS_CC;

Scene* LayerChiOption::createScene() {
    auto scene = Scene::create();
    auto layer = LayerChiOption::create();
    scene->addChild(layer);
    return scene;
}

bool LayerChiOption::init(){
    if (!Layer::init()){
        return false;
    }
    
    auto director = Director::getInstance();
    
    Size visibleSize = director->getVisibleSize();
    Vec2 origin = director->getVisibleOrigin();
    
    auto bgSp = Sprite::create("texture/login/login_bg.jpg");
    bgSp->setPosition(Vec2(origin.x + visibleSize.width - bgSp->getContentSize().width/2,origin.y + bgSp->getContentSize().height/2));
    this->addChild(bgSp);
    
    return true;
}